package com.cat.common.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cat.common.model.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @author dd-cat
 * @version 1.0
 * @date 2020-10-12 16:49
 */
@Getter
@Setter
@TableName("sys_user")
public class SysUser extends BaseEntity {

    @ApiModelProperty(value = "用户名称")
    @NotBlank
    @Excel(name = "用户名称")
    private String username;

    @ApiModelProperty(value = "用户密码")
    private String password;

    @ApiModelProperty(value = "性别：0男， 1 女")
    @Excel(name = "性别", replace = {"男_0", "女_1"})
    private String sex;

    @Excel(name = "生日")
    @ApiModelProperty(value = "生日")
    private Date birthday;

    @ApiModelProperty(value = "最近一次登录时间")
    private Date lastLoginTime;

    @ApiModelProperty(value = "最近一次登录IP地址")
    private String lastLoginIp;

    @ApiModelProperty(value = "手机号")
    @Excel(name = "手机号")
    private String mobile;

    @ApiModelProperty(value = "头像地址")
    private String avatar;

    @ApiModelProperty(value = " 0 可用  1 禁用")
    @Excel(name = "状态", replace = {"可用_0", "禁用_1"})
    private String enabled;

    @JsonIgnore
    @ApiModelProperty(value = "是否为admin账号")
    private Boolean isAdmin;

    @ApiModelProperty(value = "部门ID")
    private Long deptId;
}
